import React from 'react';
import {useEffect, useState} from 'react'

export default function Comingsoon() {

  const [list, setlist] = useState([])

  useEffect(() => {
    fetch("/api/mmdb/movie/v3/list/hot.json?ct=%E6%B7%B1%E5%9C%B3&ci=30&channelId=4")
      .then(res => res.json())
      .then(res => {
        console.log(res)
        setlist(res.data.hot)
      })

    fetch("/ajax/comingList?ci=30&limit=10&movieIds=&token=&optimus_uuid=1CDD8FD06A6B11ECA66C47D17258281EB2EA3AE526134F79BD6762DCFB6E9F4E&optimus_risk_level=71&optimus_code=10")
      .then(res => res.json())
      .then(res => {
        console.log(res)
      })
  }, [])

  return (
    <div>
      即将上映
      {
        list.map((item: any) =>
          <li key={item.id}>{item.nm}</li>)
      }
    </div>
  )
}
